import java.util.ArrayList;


public class PlayerNBoxesReverse extends PlayerNBoxes{
	
	public PlayerNBoxesReverse(PlayerNBoxes pnb) {
		super(pnb);
	}

	public PlayerNBoxesReverse(int lNumRows, int lNumColumns, ArrayList<String> input){
		super(lNumRows,lNumColumns,input);
	}
	
	public PlayerNBoxesReverse(Position initalPlayerPos, ArrayList<Position> inputBoxes) {
		super( initalPlayerPos, inputBoxes);
	}

	public PlayerNBoxesReverse(Position initalPlayerPos, Position[] inputBoxes) {
		super ( initalPlayerPos, inputBoxes);
	}
	
	
	
	@Override
	public int compareTo(PlayerNBoxes o) {
		for (int i = 0; i < boxes.length; i++ ){
			if ( boxes[i].compareTo(o.getBoxes()[i]) > 0){
				return 1;
			}
			if ( boxes[i].compareTo(o.getBoxes()[i]) < 0){
				return -1;
			}
		}
		return player.compareTo(o.player);
	}
}
